package com.mallcloud.mall.mall.api.entity.dto;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.ToString;

import java.util.Optional;

@ApiModel(value="ProGetCoupon",description="领券过程对象")
@Data
@ToString
public class ProGetCoupon {

	@ApiModelProperty("买券卡号")
	private String cardNo;
	@ApiModelProperty("门店号")
	private String storeNo;
	@ApiModelProperty("活动档期")
	private String scheduleId;
	@ApiModelProperty("券种")
	private String type;
	@ApiModelProperty("券数量")
	private String num;

	@ApiModelProperty(value = "执行状态", hidden = true)
	private Integer messageId;
	@ApiModelProperty(value = "执行提示信息", hidden = true)
	private String message;
	@ApiModelProperty(value = " ", hidden = true)
	private String tktvipno;

	public boolean isSuccess() {
		return Optional.ofNullable(this.messageId).map(x -> x.equals(0)).orElse(false);
	}
}
